home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
util3
/
hdoff133.lha
/
Developers.doc
next >
Wrap
Text File
|
1996-01-07
|
2KB
|
70 lines
Ok, this is just a rough doc about the onlineport of HDOff. Sorry for
this. To use this, you should be used to MsgPorts and their handling!
The port`s name is : HDOFF_PORT
The port`s structure is:
STRUCTURE HD,MN_SIZE
UBYTE HD_Cmd
WORD HD_TimeHD0 ;Time in secs (startvalue)
WORD HD_TimeHD1
WORD HD_TimeLeftHD0 ;Time in secs (actual)
WORD HD_TimeLeftHD1
UBYTE HD_StatHD0 ;$ff: Drive off
UBYTE HD_StatHD1
ULONG HD_PortVer ;Version of the port
LABEL HD_SIZE
The actual portversion is: $100 (standing for 1.00)
Here are the commands:
hd_GetStats equ $00
~~~~~~~~~~~
This gives you back the filled structure.
hd_SetStats equ $01
~~~~~~~~~~~
You can set HD_TimeHD0 and HD_TimeHD1 to new values, and you will get an
answer like hd_GetStats.
hd_Subscribe equ $02
~~~~~~~~~~~~
If you subscribe, you will get a message everytime a drive has been
switched on/off. Check the answer! If HD_Cmd=0 your subscribing was
unsuccessfull.
If a drive changed its status, you`ll get a messy with HD_Cmd=hd_Subscribe
filled with the new data`s. You must not change/reply or do something else
with this messy (except reading it out, of course ;) !
hd_Unsubscribe equ $03
~~~~~~~~~~~~~~
You won`t get a messys on a drive power down/up any more. If HD_Cmd=0 you
weren`t subscribed :)
hd_StopDrive equ $04
~~~~~~~~~~~~
Here you can switch a drive off by setting HD_StatHDx=$ff.
hd_Quit equ $05
~~~~~~~
This tries to terminate HDOff. If the reply has HD_Cmd=hd_Die quitting was
successfull, if not not :)
hd_ForceQuit equ $06
~~~~~~~~~~~~
The same as hd_Quit, but using the force option (can`t fail), and you won`t
get a reply. NOTE: read the warning about the FORCE-option in the doc!
hd_Die equ $FF
~~~~~~
NOTE: you can _only_ recive this! If you get this Message, HDOff has been
terminated and you must stop using the port any longer!
Ok, I hope every clarity has been removed ;-)
BTW, does anybody want to code a nice GUI for HDOff? Like a commodity or
something. If you do, please contact me!!